package cn.firegod.demo.sharding.datasource;

import org.apache.shardingsphere.shardingjdbc.api.yaml.YamlShardingDataSourceFactory;

import javax.sql.DataSource;
import java.io.File;
import java.io.IOException;
import java.sql.SQLException;

public class BasedYamlConfig {
    public DataSource dataSource(File yamlFile) throws IOException, SQLException {
        return YamlShardingDataSourceFactory.createDataSource(yamlFile);
    }
}
